home *** CD-ROM | disk | FTP | other *** search
/ New Masters of Flash / New Masters of Flash.iso / pc / MOVIES / 07.dir / 00115_Text_10.txt < prev    next >
Text File  |  2000-10-01  |  1KB  |  14 lines

  1. Now we need to add the continuous action that will change the state of the Sound Matrix (/matrix) when the user changes the value of the variable /:current. So add a keyframe to frame 5,  select it and add this action (making sure you set the Go to and Stop action to Expression):
  2.  
  3.       tellTarget (ΓÇ£/matrixΓÇ¥) {
  4.          go toAndStop (/:current);
  5.        }
  6.  
  7. The action tells the movie clip /matrix to go to the label named with the variable value of  /:current. The labels in the /matrix movie clip match the values the user buttons are set to (none, track1, track2, etc.).
  8. To make this action run over and over when the .swf plays, add a keyframe on frame 6 and add in this action (again, setting the action to Expression):
  9.  
  10.       gotoAndPlay (_currentframe - 1);
  11.  
  12. This action tells the the movie clip to go to the previous frame and play it. I chose to use an expression rather than a frame number because it makes the system easier to customize. For example, if you wanted to move your keyframes to another place, the _currentframe - 1 expression, would ensure that the loop still works.
  13. We need to put the controller movie clip on the main timeline. 
  14.